package com.boot.business.rabbitmq.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "hello")  
public class RabbitMqReceiver {

	protected static Logger logger = LoggerFactory.getLogger(RabbitMqReceiver.class);  
	  
    @RabbitHandler  
    public void process(String hello) {  
        logger.debug("RabbitMqReceiver : " + hello); 
        logger.debug("RabbitMqReceiver : 接收到新消息了，哈哈哈 哈哈 " ); 
    }  
}
